//
//  ESNewsWordsDetailNetResult.m
//  EasyStyle
//
//  Created by FK on 16/5/11.
//  Copyright © 2016年 FK. All rights reserved.
//

#import "ESNewsWordsDetailNetResult.h"

@implementation ESNewsWordsDetailNetResult

// 解析业务数据
- (void)parseNetResult:(NSDictionary *)jsonDictionary
{
    
    [super parseNetResult:jsonDictionary];
    
    
    if ([self.errorCode intValue] != 0) {
        return;
    }
    
    if ([self.result isKindOfClass:[NSArray class]]) {
        
        NSArray *arr = self.result;
        
        _newsList = [NSMutableArray arrayWithCapacity:arr.count];
        
        for (NSDictionary *dict in self.result) {
            NewsWordsDetailItem *item = [NewsWordsDetailItem new];
            
            item.title = dict[@"title"];
            item.content = dict[@"content"];
            item.img_width = dict[@"img_width"];
            item.full_title = dict[@"full_title"];
            item.pdate = dict[@"pdate"];
            item.src = dict[@"src"];
            item.img_length = dict[@"img_length"];
            item.img = dict[@"img"];
            item.url = dict[@"url"];
            item.pdate_src = dict[@"pdate_src"];
            
            [_newsList addObject:item];
        }
    }
}

@end


@implementation NewsWordsDetailItem


@end
